package while_0818;
import com.sun.xml.internal.stream.StaxXMLInputSource;
import java.util.Scanner;
public class ScannerSystemIn {
    public static void main(String[] args) {
//        Scanner sc= new Scanner(System .in);
//        int a=sc.nextInt();
//        System.out.println("年龄："+a);
//        sc.nextLine();//吃掉换行符的影响
//        String b=sc.nextLine();
//        System.out.println("姓名："+b);
//        sc.nextLine();
//        double c=sc.nextDouble();
//        System.out.println("其他："+c);
        Scanner sc=new Scanner(System.in);
        int sum=0;//整数个数
        int num=0;
        while(sc.hasNextInt()){
            int tmp=sc.nextInt();
            sum+=tmp;
            num++;
        }
        System.out.println("sum="+sum);
        System.out.println("num="+num);
    }
}
